<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<?php
    $data = unserialize($info['data']);
    if($data){
      $keys = array_keys($data);
    }else{
        $keys=array();
    }

?>
<style>
.bootstrap-select.form-control:not([class*=col-]) {
    width: 90%!important;
}
</style>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" data-rule="required" class="form-control datetimepicker form-control" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[start_time]" disabled type="text" value="{$row['start_time']}">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" data-rule="required" class="form-control datetimepicker form-control" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[end_time]" disabled type="text" value="{$row['end_time']}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">分组:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="col-xs-12 col-sm-12">
                <dl class="fieldlist" id="fieldlist" data-index="1">
                    <dd id="bappend"><a href="javascript:;" class="btn btn-sm btn-success" id="append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                    <dd class="form-inline <?php if(!in_array(1,$keys))echo 'hidden';?>">
                        <select   data-max-options="6" id="sel1" class="form-control  selectpicker" multiple="" name="data[1][]">
                            {foreach name="groupdata" item="vo"}
                            <option <?php if($data && array_key_exists(1,$data) && in_array($key,$data[1]))echo 'selected';?> value="{$key}"  {if condition="strpos($key,',') neq false"}disabled{/if}>{$vo}</option>
                            {/foreach}
                        </select>
                        <span class="btn btn-sm btn-danger btn-removes"><i class="fa fa-times"></i></span>
                    </dd>
                    <dd class="form-inline <?php if(!in_array(2,$keys))echo 'hidden';?>">
                        <select   data-max-options="6"  id="sel2"  class="form-control sel2 selectpicker" multiple="" name="data[2][]">
                            {foreach name="groupdata" item="vo"}
                            <option <?php if($data && array_key_exists(2,$data) && in_array($key,$data[2]))echo 'selected';?> value="{$key}"  {if condition="strpos($key,',') neq false"}disabled{/if}>{$vo}</option>
                            {/foreach}
                        </select>
                        <span class="btn btn-sm btn-danger btn-removes"><i class="fa fa-times"></i></span>
                    </dd>
                    <dd class="form-inline <?php if(!in_array(3,$keys))echo 'hidden';?>">
                        <select   data-max-options="6" id="sel3"  class="form-control sel3 selectpicker" multiple="" name="data[3][]">
                            {foreach name="groupdata" item="vo"}
                            <option <?php if($data && array_key_exists(3,$data) && in_array($key,$data[3]))echo 'selected';?> value="{$key}"  {if condition="strpos($key,',') neq false"}disabled{/if}>{$vo}</option>
                            {/foreach}
                        </select>
                        <span class="btn btn-sm btn-danger btn-removes"><i class="fa fa-times"></i></span>
                    </dd>
                    <dd class="form-inline <?php if(!in_array(4,$keys))echo 'hidden';?>">
                        <select   data-max-options="6"  id="sel4" class="form-control sel4 selectpicker" multiple="" name="data[4][]">
                            {foreach name="groupdata" item="vo"}
                            <option <?php if($data && array_key_exists(4,$data) && in_array($key,$data[4]))echo 'selected';?> value="{$key}"  {if condition="strpos($key,',') neq false"}disabled{/if}>{$vo}</option>
                            {/foreach}
                        </select>
                        <span class="btn btn-sm btn-danger btn-removes"><i class="fa fa-times"></i></span>
                    </dd>
                    <dd class="form-inline <?php if(!in_array(5,$keys))echo 'hidden';?>">
                        <select   data-max-options="6" id="sel5"  class="form-control sel5 selectpicker" multiple="" name="data[5][]">
                            {foreach name="groupdata" item="vo"}
                            <option <?php if($data && array_key_exists(5,$data) && in_array($key,$data[5]))echo 'selected';?> value="{$key}"  {if condition="strpos($key,',') neq false"}disabled{/if}>{$vo}</option>
                            {/foreach}
                        </select>
                        <span class="btn btn-sm btn-danger btn-removes"><i class="fa fa-times"></i></span>
                    </dd>
                    <dd class="form-inline <?php if(!in_array(6,$keys))echo 'hidden';?>">
                        <select   data-max-options="6" id="sel6"  class="form-control sel6 selectpicker" multiple="" name="data[6][]">
                            {foreach name="groupdata" item="vo"}
                            <option <?php if($data && array_key_exists(6,$data) && in_array($key,$data[6]))echo 'selected';?> value="{$key}"  {if condition="strpos($key,',') neq false"}disabled{/if}>{$vo}</option>
                            {/foreach}
                        </select>
                        <span class="btn btn-sm btn-danger btn-removes"><i class="fa fa-times"></i></span>
                    </dd>


                </dl>
            </div>

            <input type="hidden" id="hide" value="">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
